import React from 'react'
import {Col, Row} from 'antd'
import { FormattedMessage } from 'react-intl'
import {previewModalStyle} from '../../../constant/constant-style'
import {TwsReactMarkdownPreview} from 'tws-antd'

const LogicQuiz = ({quiz, formItemLayout, FormItem}) => {
  return <Row>
    <FormItem {...previewModalStyle} label={<FormattedMessage id='时长' />}>
      <span>{quiz.timeBoxInMinutes} mins</span>
    </FormItem>
    <FormItem {...previewModalStyle} label={<FormattedMessage id='描述' />}>
      <TwsReactMarkdownPreview source={quiz.description} />
    </FormItem>
    <Col span={6} offset={2}>
      <FormattedMessage id='简单' />：<span>{quiz.easyCount}</span>
    </Col>
    <Col span={6}>
      <FormattedMessage id='一般' />：<span>{quiz.normalCount}</span>
    </Col>
    <Col span={6}>
      <FormattedMessage id='困难' />：<span>{quiz.hardCount}</span>
    </Col>
  </Row>
}

export default LogicQuiz
